/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller.dialog;

import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

/**
 * Dilog de progress  bar
 * Implementa o Patterner Singleton
 * @author Adriano
 */
public class Load {
    private static Load l;
    private Stage s;
    
    public Load() {
        if (s == null) {
            try{
                Parent root = FXMLLoader.load(getClass().getResource("/view/jogador/Load.fxml"));
                Scene scene = new Scene(root,Color.web("0xdfdfdf05") );
                s = new Stage(StageStyle.TRANSPARENT);
                s.setScene(scene);
                s.initModality(Modality.APPLICATION_MODAL);
            }catch(Exception e){}
        }
    }

    /**Retorna a unitca instância da classe*/
    public static Load getLoad(){
        if (l == null) {
            l = new Load();
        }
        return  l;
    }
    
    public Stage getSage() {
        return s;
    }    
}
